#define _CRT_SECURE_NO_WARNINGS 1
#include"stack.h"
#include"queue.h"

using std::cout;
using std::endl;
#include<list>

int main()
{
	//using namespace my_stack;
	//stack<int> st1;
	//st1.push(1);
	//st1.push(2);
	//st1.push(3);
	//st1.push(4);
	//st1.push(5);
	//cout << "size:" << st1.size() << endl;
	//while (!st1.empty())
	//{
	//	cout << st1.top() << " ";
	//	st1.pop();
	//}
	//cout << endl;

	//stack<int,std::list<int>> st2;
	//st2.push(1);
	//st2.push(2);
	//st2.push(3);
	//st2.push(4);
	//st2.push(5);
	//cout << "size:" << st2.size() << endl;
	//while (!st2.empty())
	//{
	//	cout << st2.top() << " ";
	//	st2.pop();
	//}
	//cout << endl;

	using namespace my_queue;
	queue<int> st1;
	st1.push(1);
	st1.push(2);
	st1.push(3);
	st1.push(4);
	st1.push(5);
	cout << "size:" << st1.size() << endl;
	while (!st1.empty())
	{
		cout << st1.front() << " " << st1.back()<<" ";
		st1.pop();
	}
	cout << endl;

	queue<int, std::list<int>> st2;
	st2.push(1);
	st2.push(2);
	st2.push(3);
	st2.push(4);
	st2.push(5);
	cout << "size:" << st2.size() << endl;
	while (!st2.empty())
	{
		cout << st2.front() << " " << st2.back() << " ";
		st2.pop();
	}
	cout << endl;
	//return 0;
}